package Zuoye2;

public class Student extends Person{
    double no=1;
    double scoreEn;
    double scoreMa;
    double scoreCh;
    public Student(){
    }
    public double aver(){
        return (scoreEn+scoreMa+scoreCh)/3;
    }
    public double max(){
        return Math.max(Math.max(scoreEn,scoreMa),scoreCh);
    }
    public double min(){
        return Math.min(Math.min(scoreEn,scoreMa),scoreCh);
    }

    @Override
    public String toString() {
        return "Student{" +
                "no=" + no +
                ", aver=" + aver() +
                ", max=" + max() +
                ", min=" + min() +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }

}
